#include "TicketMachine.h"
#include <iostream>
using namespace std;

TicketMachine::TicketMachine() : PRICE(10), balance(0), total(0) {
    // constructor need initialize const member must in initializer list
}

TicketMachine::~TicketMachine() {
    // destructor
}

void TicketMachine::showPrompt() {
    cout << "something";
}

void TicketMachine::insertMoney(int money) {
    balance += money;
}

void TicketMachine::showBalance() {
    cout << balance;
}

void TicketMachine::printTicket() {
    if (balance >= PRICE) {
        balance -= PRICE;
        total += PRICE;
        cout << "Ticket printed. Remaining balance: " << balance << endl;
    } else {
        cout << "Insufficient balance. Please insert more money." << endl;
    }
}

void TicketMachine::showTotal() {
    cout << "Total collected: " << total << endl;
}
